//
// Created by 24087 on 2025/3/29.
//

#ifndef MY_CAN_H
#define MY_CAN_H
#include <can.h>

extern const uint32_t _STD_ID;
extern const uint32_t _EXT_ID;
extern const uint32_t _LENGTH;
extern uint8_t RxData[8];
extern CAN_RxHeaderTypeDef RxHeader;
extern const CAN_FilterTypeDef Filter0_cfg;
extern CAN_TxHeaderTypeDef Tx_header;
extern uint8_t TxData[8];
extern uint32_t MailBox0;


void CAN_Init(const CAN_FilterTypeDef Filter_cfg);

HAL_StatusTypeDef CAN_Send(const CAN_TxHeaderTypeDef TxHeader, uint8_t Data[], uint32_t Mailbox);

HAL_StatusTypeDef CAN_Filter_Init(const CAN_FilterTypeDef Filter_cfg);

uint32_t Get_FIFO_Flag();

HAL_StatusTypeDef CAN_Receive(CAN_RxHeaderTypeDef RxHeader);
#endif //MY_CAN_H
